<?php

class MaterialPeer extends BaseMaterialPeer
{
	static function countOrg()
	{
		$c = new Criteria();
		$c->add(MaterialPeer::TYPE_ID,1);
		$c->addAnd(MaterialPeer::PUB,true);
		return MaterialPeer::doCount($c);
	}
	

static function getShortContact()
	{
		$m = MaterialPeer::retrieveByPK(sfConfig::get('app_mat_contact'));
		return $m->getShortContent();
	}
	
static function getLongContact()
	{
		$m = MaterialPeer::retrieveByPK(sfConfig::get('app_mat_contact'));
		if($m)
		{
		  return $m->getContent();
		}
		else 
		{
			return '';
		}
	}
	
	
static function getILongContact()
	{
		$m = MaterialPeer::retrieveByPK(sfConfig::get('app_mat_contact'));
		if($m)
		{
		  return $m->getIFullDescription();
		}
		else 
		{
			return '';
		}
	}
	
static function getITitle()
	{
		$m = MaterialPeer::retrieveByPK(sfConfig::get('app_mat_contact'));
		if($m)
		{
		  return $m->getITitle();
		}
		else 
		{
			return '';
		}
	}
	
	
	
}
